/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('intelligentcreation', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ActualDeductResourceCmd {
  cost?: long(name='cost', example='60'),
  extraInfo?: string(name='extraInfo', example='12249732894'),
  idempotentId?: string(name='idempotentId', example='28274623764834'),
  taskId?: string(name='taskId', example='12249732894'),
}

model ActualDeductResourceResult {
  errorCode?: string(name='errorCode'),
  errorMessage?: string(name='errorMessage'),
  requestId?: string(name='requestId', example='3239281273464326823'),
  success?: boolean(name='success'),
}

model DigitalHumanLiveBroadcastQACmd {
  accountId?: string(name='accountId'),
  history?: [ 
    {
      bot?: string(name='bot'),
      user?: string(name='user'),
    }
  ](name='history'),
  question?: string(name='question'),
  sessionId?: string(name='sessionId'),
  stream?: boolean(name='stream'),
  subAccountId?: string(name='subAccountId'),
}

model DigitalHumanLiveBroadcastQAResult {
  content?: string(name='content'),
  errorCode?: string(name='errorCode'),
  errorMessage?: string(name='errorMessage'),
  sessionId?: string(name='sessionId'),
  success?: boolean(name='success'),
}

model DigitalVideoCommonResult {
  errorCode?: string(name='errorCode'),
  errorMessage?: string(name='errorMessage'),
  requestId?: string(name='requestId', example='3239281273464326823'),
  success?: boolean(name='success'),
}

model DirectDeductResourceCmd {
  accountId?: string(name='accountId', example='123123424'),
  cost?: long(name='cost', example='60'),
  deductScene?: string(name='deductScene', example='0,1,2,201,3,4'),
  extraInfo?: string(name='extraInfo', example='12249732894'),
  idempotentId?: string(name='idempotentId', example='28274623764834'),
  resourceType?: long(name='resourceType'),
  subAccountId?: string(name='subAccountId', example='123123424'),
  token?: string(name='token', example='dfshskdfjsdlfjafjls'),
}

model DirectDeductResourceResult {
  errorCode?: string(name='errorCode'),
  errorMessage?: string(name='errorMessage'),
  requestId?: string(name='requestId', example='3239281273464326823'),
  success?: boolean(name='success'),
}

model ExpectDeductResourceCmd {
  accountId?: string(name='accountId', example='123123424'),
  cost?: long(name='cost', example='60'),
  deductScene?: string(name='deductScene'),
  extraInfo?: string(name='extraInfo', example='12249732894'),
  idempotentId?: string(name='idempotentId', example='28274623764834'),
  resourceType?: long(name='resourceType'),
  subAccountId?: string(name='subAccountId', example='123123424'),
  token?: string(name='token', example='dfshskdfjsdlfjafjls'),
}

model ExpectDeductResourceResult {
  errorCode?: string(name='errorCode'),
  errorMessage?: string(name='errorMessage'),
  requestId?: string(name='requestId', example='3239281273464326823'),
  success?: boolean(name='success'),
  taskId?: string(name='taskId'),
}

model SubmitBulletQuestionsCmd {
  accountId?: string(name='accountId'),
  questions?: [ 
    {
      content?: string(name='content'),
      id?: string(name='id'),
      time?: long(name='time'),
      username?: string(name='username'),
    }
  ](name='questions'),
  roomId?: string(name='roomId'),
  subAccountId?: string(name='subAccountId'),
}

model SubmitBulletQuestionsQAResult {
  errorCode?: string(name='errorCode'),
  errorMessage?: string(name='errorMessage'),
  success?: boolean(name='success'),
}

model SyncDigitalHumanVideoCmd {
  accountId?: string(name='accountId', example='60'),
  actionType?: string(name='actionType', example='DELETE'),
  idempotentId?: string(name='idempotentId', example='28274623764834'),
  imageScale?: string(name='imageScale'),
  imageUrl?: string(name='imageUrl'),
  videoDuration?: int32(name='videoDuration'),
  videoId?: string(name='videoId', example='123123424'),
  videoTitle?: string(name='videoTitle'),
  videoUrl?: string(name='videoUrl'),
}

model ActualDeductResourceRequest {
  body?: ActualDeductResourceCmd(name='body'),
}

model ActualDeductResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ActualDeductResourceResult  
}

async function actualDeductResourceWithOptions(request: ActualDeductResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ActualDeductResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'ActualDeductResource',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/v1/digital-human/commands/actual-deduct`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function actualDeductResource(request: ActualDeductResourceRequest): ActualDeductResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return actualDeductResourceWithOptions(request, headers, runtime);
}

model ActualDeductResourcesRequest {
  body?: ActualDeductResourceCmd(name='body'),
}

model ActualDeductResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ActualDeductResourceResult  
}

async function actualDeductResourcesWithOptions(request: ActualDeductResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ActualDeductResourcesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'ActualDeductResources',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/actualDeductResources`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function actualDeductResources(request: ActualDeductResourcesRequest): ActualDeductResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return actualDeductResourcesWithOptions(request, headers, runtime);
}

model CopywritingQARequest {
  accountId?: string(name='accountId', example='715307080659124224'),
  histories?: [ 
    {
      bot?: string(name='bot'),
      user?: string(name='user'),
    }
  ](name='histories'),
  history?: {
    bot?: string(name='bot', example='ty'),
    user?: string(name='user', example='user1'),
  }(name='history', deprecated='true'),
  question?: string(name='question'),
  sessionId?: string(name='sessionId', example='S-d35e9f70-7381-4bc8-80fa-c4d2174d14b9'),
  stream?: boolean(name='stream', example='true'),
  subAccountId?: string(name='subAccountId', example='713168672276873216'),
}

model CopywritingQAShrinkRequest {
  accountId?: string(name='accountId', example='715307080659124224'),
  historiesShrink?: string(name='histories'),
  historyShrink?: string(name='history', deprecated='true'),
  question?: string(name='question'),
  sessionId?: string(name='sessionId', example='S-d35e9f70-7381-4bc8-80fa-c4d2174d14b9'),
  stream?: boolean(name='stream', example='true'),
  subAccountId?: string(name='subAccountId', example='713168672276873216'),
}

model CopywritingQAResponseBody = {
  content?: string(name='content'),
  errorCode?: string(name='errorCode', example='040002'),
  errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
  sessionId?: string(name='sessionId', example='S-f4ef59ee-7219-404a-ac0f-1e149c3f6b41'),
  success?: boolean(name='success', example='True'),
}

model CopywritingQAResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CopywritingQAResponseBody(name='body'),
}

async function copywritingQAWithOptions(tmpReq: CopywritingQARequest, headers: map[string]string, runtime: Util.RuntimeOptions): CopywritingQAResponse {
  Util.validateModel(tmpReq);
  var request = new CopywritingQAShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.histories)) {
    request.historiesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.histories, 'histories', 'json');
  }
  if (!Util.isUnset(tmpReq.history)) {
    request.historyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.history, 'history', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.accountId)) {
    query['accountId'] = request.accountId;
  }
  if (!Util.isUnset(request.historiesShrink)) {
    query['histories'] = request.historiesShrink;
  }
  if (!Util.isUnset(request.historyShrink)) {
    query['history'] = request.historyShrink;
  }
  if (!Util.isUnset(request.question)) {
    query['question'] = request.question;
  }
  if (!Util.isUnset(request.sessionId)) {
    query['sessionId'] = request.sessionId;
  }
  if (!Util.isUnset(request.stream)) {
    query['stream'] = request.stream;
  }
  if (!Util.isUnset(request.subAccountId)) {
    query['subAccountId'] = request.subAccountId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CopywritingQA',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/copywritingQA`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function copywritingQA(request: CopywritingQARequest): CopywritingQAResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return copywritingQAWithOptions(request, headers, runtime);
}

model CopywritingQAV1Request {
  body?: DigitalHumanLiveBroadcastQACmd(name='body'),
}

model CopywritingQAV1Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DigitalHumanLiveBroadcastQAResult  
}

async function copywritingQAV1WithOptions(request: CopywritingQAV1Request, headers: map[string]string, runtime: Util.RuntimeOptions): CopywritingQAV1Response {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'CopywritingQAV1',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/copywritingQAV1`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function copywritingQAV1(request: CopywritingQAV1Request): CopywritingQAV1Response {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return copywritingQAV1WithOptions(request, headers, runtime);
}

model DeleteDigitalVideoRequest {
  accountId?: string(name='accountId', example='715307080659124224'),
  videoId?: string(name='videoId', example='123124123'),
}

model DeleteDigitalVideoResponseBody = {
  errorCode?: string(name='errorCode', example='Deduct.DeductTaskAlreadySuccess'),
  errorMessage?: string(name='errorMessage', example='Deduct task already success,Please do not resubmit.token \\"369e8f2c-d283-424a-96c4-c83efe08c89e\\"'),
  requestId?: string(name='requestId', description='Id of the request', example='0E8B1746-AE35-5C4B-A3A8-345B274AE32C'),
  success?: boolean(name='success', example='True'),
}

model DeleteDigitalVideoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDigitalVideoResponseBody(name='body'),
}

async function deleteDigitalVideoWithOptions(request: DeleteDigitalVideoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteDigitalVideoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountId)) {
    body['accountId'] = request.accountId;
  }
  if (!Util.isUnset(request.videoId)) {
    body['videoId'] = request.videoId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDigitalVideo',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/videos`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDigitalVideo(request: DeleteDigitalVideoRequest): DeleteDigitalVideoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteDigitalVideoWithOptions(request, headers, runtime);
}

model DirectDeductResourceRequest {
  body?: DirectDeductResourceCmd(name='body'),
}

model DirectDeductResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DirectDeductResourceResult  
}

async function directDeductResourceWithOptions(request: DirectDeductResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DirectDeductResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'DirectDeductResource',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/v1/digital-human/commands/direct-deduct`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function directDeductResource(request: DirectDeductResourceRequest): DirectDeductResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return directDeductResourceWithOptions(request, headers, runtime);
}

model DirectDeductResourcesRequest {
  body?: DirectDeductResourceCmd(name='body'),
}

model DirectDeductResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DirectDeductResourceResult  
}

async function directDeductResourcesWithOptions(request: DirectDeductResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DirectDeductResourcesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'DirectDeductResources',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/directDeductResources`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function directDeductResources(request: DirectDeductResourcesRequest): DirectDeductResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return directDeductResourcesWithOptions(request, headers, runtime);
}

model ExpectDeductResourceRequest {
  body?: ExpectDeductResourceCmd(name='body'),
}

model ExpectDeductResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExpectDeductResourceResult  
}

async function expectDeductResourceWithOptions(request: ExpectDeductResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ExpectDeductResourceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'ExpectDeductResource',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/v1/digital-human/commands/expect-deduct`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function expectDeductResource(request: ExpectDeductResourceRequest): ExpectDeductResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return expectDeductResourceWithOptions(request, headers, runtime);
}

model ExpectDeductResourcesRequest {
  body?: ExpectDeductResourceCmd(name='body'),
}

model ExpectDeductResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExpectDeductResourceResult  
}

async function expectDeductResourcesWithOptions(request: ExpectDeductResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ExpectDeductResourcesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'ExpectDeductResources',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/expectDeductResources`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function expectDeductResources(request: ExpectDeductResourcesRequest): ExpectDeductResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return expectDeductResourcesWithOptions(request, headers, runtime);
}

model GetRemainResourceRequest {
  accountId?: string(name='accountId', example='1868512340232755'),
  resourceType?: string(name='resourceType', example='1'),
  subAccountId?: string(name='subAccountId', example='124214324234234'),
}

model GetRemainResourceResponseBody = {
  errorCode?: string(name='errorCode', example='040002'),
  errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
  remainCount?: int32(name='remainCount', example='12'),
  requestId?: string(name='requestId', description='Id of the request', example='827BF714-19E7-51B5-A434-C21BFEE05983'),
  success?: boolean(name='success', example='True'),
}

model GetRemainResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetRemainResourceResponseBody(name='body'),
}

async function getRemainResourceWithOptions(request: GetRemainResourceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetRemainResourceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.accountId)) {
    query['accountId'] = request.accountId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['resourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.subAccountId)) {
    query['subAccountId'] = request.subAccountId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetRemainResource',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/getRemainResource`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getRemainResource(request: GetRemainResourceRequest): GetRemainResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getRemainResourceWithOptions(request, headers, runtime);
}

model SubmitBulletQuestionsRequest {
  accountId?: string(name='accountId', example='715307080659124224'),
  questions?: [ 
    {
      content?: string(name='content'),
      id?: string(name='id', example='21007'),
      time?: long(name='time'),
      username?: string(name='username'),
    }
  ](name='questions', description='questions'),
  roomId?: string(name='roomId', example='963865'),
  subAccountId?: string(name='subAccountId', example='713168672276873216'),
}

model SubmitBulletQuestionsShrinkRequest {
  accountId?: string(name='accountId', example='715307080659124224'),
  questionsShrink?: string(name='questions', description='questions'),
  roomId?: string(name='roomId', example='963865'),
  subAccountId?: string(name='subAccountId', example='713168672276873216'),
}

model SubmitBulletQuestionsResponseBody = {
  errorCode?: string(name='errorCode', example='040002'),
  errorMessage?: string(name='errorMessage', example='Failed to proxy flink ui request, message: An error occurred: Invalid UUID string: jobsn'),
  success?: boolean(name='success', example='True'),
}

model SubmitBulletQuestionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitBulletQuestionsResponseBody(name='body'),
}

async function submitBulletQuestionsWithOptions(tmpReq: SubmitBulletQuestionsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SubmitBulletQuestionsResponse {
  Util.validateModel(tmpReq);
  var request = new SubmitBulletQuestionsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.questions)) {
    request.questionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.questions, 'questions', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.accountId)) {
    query['accountId'] = request.accountId;
  }
  if (!Util.isUnset(request.questionsShrink)) {
    query['questions'] = request.questionsShrink;
  }
  if (!Util.isUnset(request.roomId)) {
    query['roomId'] = request.roomId;
  }
  if (!Util.isUnset(request.subAccountId)) {
    query['subAccountId'] = request.subAccountId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitBulletQuestions',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/submitBulletQuestions`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitBulletQuestions(request: SubmitBulletQuestionsRequest): SubmitBulletQuestionsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return submitBulletQuestionsWithOptions(request, headers, runtime);
}

model SubmitBulletQuestionsV1Request {
  body?: SubmitBulletQuestionsCmd(name='body'),
}

model SubmitBulletQuestionsV1Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitBulletQuestionsQAResult  
}

async function submitBulletQuestionsV1WithOptions(request: SubmitBulletQuestionsV1Request, headers: map[string]string, runtime: Util.RuntimeOptions): SubmitBulletQuestionsV1Response {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'SubmitBulletQuestionsV1',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/commands/submitBulletQuestionsV1`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function submitBulletQuestionsV1(request: SubmitBulletQuestionsV1Request): SubmitBulletQuestionsV1Response {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return submitBulletQuestionsV1WithOptions(request, headers, runtime);
}

model SyncDigitalVideoRequest {
  body?: SyncDigitalHumanVideoCmd(name='body'),
}

model SyncDigitalVideoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DigitalVideoCommonResult  
}

async function syncDigitalVideoWithOptions(request: SyncDigitalVideoRequest, headers: map[string]string, runtime: Util.RuntimeOptions): SyncDigitalVideoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(request.body),
  };
  var params = new OpenApi.Params{
    action = 'SyncDigitalVideo',
    version = '2024-01-18',
    protocol = 'HTTPS',
    pathname = `/yic/yic-console/openService/v1/digitalHuman/videos/commands/syncDigitalVideo`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function syncDigitalVideo(request: SyncDigitalVideoRequest): SyncDigitalVideoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return syncDigitalVideoWithOptions(request, headers, runtime);
}

